<template>
	<view class="box" v-if="showflag">
		<view class="default_icon">
			<image :src="data[type].img" mode=""></image>
		</view>
		<view class="default_text">{{ data[type].text }}</view>
	</view>
</template>

<script>
	export default{
		props: ['type', 'showflag'],
		data() {
			return{
				data:[
					{
						img: 'https://community.chuangxiangdianli.com/images/default/one.png',
						text: '暂无消息'
					},
					{
						img: 'https://community.chuangxiangdianli.com/images/default/four.png',
						text: '无网络'
					},
					{
						img: 'https://community.chuangxiangdianli.com/images/default/three.png',
						text: '404'
					},
					{
						img: 'https://community.chuangxiangdianli.com/images/default/two.png',
						text: '购物车空空如也~'
					},
					{
						img: 'https://community.chuangxiangdianli.com/images/default/five.png',
						text: '暂无数据'
					},
				]
			}
		}
	}
</script>

<style lang="scss" scoped>
	.box{
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		height: 500rpx;
		// min-height: 500rpx;
		width: 100%;
		.default_icon{
			height: 400rpx;
			width: 400rpx;
			&>image{
				display: block;
				height: 100%;
				width: 100%;
			}
		}
		.default_text{
			text-align: center;
			font-size: 30rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #A1ADBD;
		}
	}
</style>
